
import { request } from '@umijs/max';

// 货物发布
export async function saveGoods(params: API.Params = {}) {
    params.needLogin = true // 需要登录
    return request(`/release/release/saveGoods`, {
        method: 'POST',
        data: { ...params }
    });
}
 // 获取货物详情
 export async function getGoodsDetail(params: API.Params = {}) {
    return request(`/release/release/getGoodsDetail`, {
        method: 'GET',
        params: { ...params }
    });
}
  // 运输发布
  export async function saveTransport(params: API.Params = {}) {
    params.needLogin = true // 需要登录
    return request(`/release/release/saveTransport`, {
        method: 'POST',
        data: { ...params }
    });
}
// 获取运输详情
export async function getTransportDetail(params: API.Params = {}) {
    return request(`/release/release/getTransportDetail`, {
        method: 'GET',
        params: { ...params }
    });
}

// 跨境货代发布
export async function saveCrossborder(params: API.Params = {}) {
    params.needLogin = true // 需要登录
    return request(`/release/release/saveCrossborder`, {
        method: 'POST',
        data: { ...params }
    });
}
// 获取跨境货代详情
export async function getCrossborderDetail(params: API.Params = {}) {
    return request(`/release/release/getCrossborderDetail`, {
        method: 'GET',
        params: { ...params }
    });
}

  // 专业代办发布
  export async function saveProfessional(params: API.Params = {}) {
    params.needLogin = true // 需要登录
    return request(`/release/release/saveProfessional`, {
        method: 'POST',
        data: { ...params }
    });
}
// 获取专业代办详情
export async function getProfessionalDetail(params: API.Params = {}) {
    return request(`/release/release/getProfessionalDetail`, {
        method: 'GET',
        params: { ...params }
    });
}

//  生活广告发布
export async function saveLifead(params: API.Params = {}) {
    params.needLogin = true // 需要登录
    return request(`/release/release/saveLifead`, {
        method: 'POST',
        data: { ...params }
    });
}
// 获取生活广告详情
export async function getLifeadDetail(params: API.Params = {}) {
    return request(`/release/release/getLifeadDetail`, {
        method: 'GET',
        params: { ...params }
    });
}
//  中俄新闻发布
export async function saveNews(params: API.Params = {}) {
    params.needLogin = true // 需要登录
    return request(`/release/release/saveNews`, {
        method: 'POST',
        data: { ...params }
    });
}
// 获取中俄新闻详情
export async function getNewsDetail(params: API.Params = {}) {
    return request(`/release/release/getNewsDetail`, {
        method: 'GET',
        params: { ...params }
    });
}
//  曝光台发布
export async function saveExposure(params: API.Params = {}) {
    params.needLogin = true // 需要登录
    return request(`/release/release/saveExposure`, {
        method: 'POST',
        data: { ...params }
    });
}
// 获取曝光台详情
export async function getExposureDetail(params: API.Params = {}) {
    return request(`/release/release/getExposureDetail`, {
        method: 'GET',
        params: { ...params }
    });
}